/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package times;

import org.zkoss.zk.ui.Component;
import org.zkoss.zk.ui.select.SelectorComposer;
import org.zkoss.zk.ui.select.annotation.Listen;
import org.zkoss.zk.ui.select.annotation.Wire;
import org.zkoss.zul.ListModelList;
import org.zkoss.zul.Listbox;
import org.zkoss.zul.Textbox;

/**
 *
 * @author Administrator
 */
public class Main  extends SelectorComposer<Component>{

    @Wire
    Textbox myMsg;
    
    @Wire
    Listbox myLst;
    
    ListModelList myLml ;
    
    @Listen("onClick = #myBtn")
    public void onMyBtnClick() {
        //Messagebox.show("hello world !!"); 
        myMsg.setText("hello world !!");
    }
    
    @Listen("onClick = #myAnotherBtn")
    public void onMyAnotherBtnClick() {
     
        TimesDAO tdao = new TimesDAO();
        
        myLml = new ListModelList(tdao.findPriceSourceEntities());
        
        myLst.setModel(myLml);
    }
    
    
    
}
